home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / flex_247.zip / flex_247 / MISC / Think-C / macutils.c next >
C/C++ Source or Header  |  1992-01-28  |  437b  |  27 lines

  1. #ifdef THINK_C
  2. #include <Memory.h>
  3. #include <Resources.h>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include "flexdef.h"
  7.  
  8. /**
  9.  **        Load a static table from the current resource file
  10.  **/
  11.  
  12. short int *load_table (int id)
  13. {
  14.     Handle h;
  15.     
  16.     if ((h = GetResource ('YYst', id)) == NULL) {
  17.         fputs ("error loading static table resource", stderr);
  18.         putc ('\n', stderr);
  19.         exit (1);
  20.         }
  21.     MoveHHi (h);
  22.     HLock (h);
  23.     return (short int *) *h;
  24.     }
  25. #endif
  26.  
  27.